{% extends 'Base/main.content.lists.div.html.twig' %}
{% import 'Base/list_item.twig' as listItem %}

{% block options %}
    <div class="menu-list">
        {#{{ dump(tools) }}#}
        {% for key , classes in tools %}
            {% set default = "请选择分类" %}
            {% set classes = classes %}
            <div class="rule-single-select">
                <select name="cond[{{ key }}]" onchange="javascript:__doPostBack('searchCond','')" >
                    <option value="" {{app.request.get("cond")[key] is defined and app.request.get("cond")[key] == "" ? ' selected="selected"' : "" }} >{{ default }}</option>
                    {% for class in classes %}
                        <option value="{{ class.id }}"
                                {{app.request.get("cond")[key] is defined and  app.request.get("cond")[key] == class.id ? ' selected="selected"' : "" }}
                        >{{ class.name }}</option>
                    {% endfor %}
                </select>
            </div>
        {% endfor %}
    </div>
{% endblock %}
{% block tableHead %}
    <tr>
        <th align="" width="">选择</th>
        <th align="" width="">ID</th>
        <th align="" width="">名称</th>
        <th align="" width="">vi</th>
        <th align="" width="">salt</th>
        <th align="" width="">创建时间</th>
        <th align="" width="">状态</th>
        <th align="" width="">操作</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align='' width=''>
                <span class="checkall"><input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.Project_id }}"/></span>
            </td>
            <td align='' width='' id='name_{{ Entity.Project_id }}'>
                {{ listItem.text('id',Entity.Project_id,Entity.Project_id) }}
            </td>
            <td align='' width='' id='name_{{ Entity.Project_id }}'>
                {{ listItem.text('name',Entity.Project_name,Entity.Project_id) }}
            </td>
            <td align='' width='' id='vi_{{ Entity.Project_id }}'>
                {{ listItem.text('vi',Entity.Project_vi,Entity.Project_id) }}
            </td>
            <td align='' width='' id='salt_{{ Entity.Project_id }}'>
                {{ listItem.text('salt',Entity.Project_salt,Entity.Project_id) }}
            </td>
            <td align='' width='' id='addtime_{{ Entity.Project_id }}'>
                {{ listItem.text('addtime',Entity.Project_addtime,Entity.Project_id) }}
            </td>
            <td align='' width='' id='status_{{ Entity.Project_id }}'>
                {{ listItem.switch('status',Entity.Project_status,Entity.Project_id) }}
            </td>
            <td align='' width=''>
                {{ listItem.manage('Project','',Entity.Project_id) }}
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

